/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author mehdi
 */
@Entity
public class Administrator implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idad;
    private String name;
   
   private String frNam;
   
   private String adrs;
   
   private int phone;
  
   private String eMai;
    @OneToOne
   private Account acnt;

   
    public Administrator() {
    }

    public Account getAcnt() {
        return acnt;
    }

    public void setAcnt(Account acnt) {
        this.acnt = acnt;
    }

    

    
    public String getAdrs() {
        return adrs;
    }

    public void setAdrs(String adrs) {
        this.adrs = adrs;
    }

    public String geteMai() {
        return eMai;
    }

    public void seteMai(String eMai) {
        this.eMai = eMai;
    }

    public String getFrNam() {
        return frNam;
    }

    public void setFrNam(String frNam) {
        this.frNam = frNam;
    }

    public Long getIdad() {
        return idad;
    }

    public void setIdad(Long idad) {
        this.idad = idad;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPhone() {
        return phone;
    }

    public void setPhone(int phone) {
        this.phone = phone;
    }
 

  
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idad != null ? idad.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Administrator)) {
            return false;
        }
        Administrator other = (Administrator) object;
        if ((this.idad == null && other.idad != null) || (this.idad != null && !this.idad.equals(other.idad))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Administrator[ id=" + idad + " ]";
    }
    
}
